import { createRouter, createWebHistory } from "vue-router";
import Test from "../views/test.vue";
import Home from "../components/home/home.vue";
import Login from "../views/login.vue";
const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/test",
      component: Test,
    },
    {
      path: "/login",
      component: Login,
    },
    {
      path: "/",
      component: () => import("../App.vue"),
      redirect: "/home",
      children: [
        {
          path: "/home",
          component: Home,
        },
        {
          path: "/admin",
          component: () => import("../components/admin/index.vue"),
        },
        {
          path: "/mine",
          component: () => import("../components/mine/index.vue"),
        },
      ],
    },
    {
      path: "/personal_sign",
      component: () => import("../views/personal_sign.vue"),
    },
    {
      path: "/sel_user",
      component: () => import("../views/sel_user.vue"),
    },
    {
      path: "/sel_pro",
      component: () => import("../views/sel_pro.vue"),
    },
    // 我的路由
    {
      // 我的订单
      path: "/my_order",
      component: () => import("../views/page/my/my_order.vue"),
    },
    {
      // 个人签约
      path: "/my_check",
      component: () => import("../views/page/my/my_check.vue"),
    },
    {
      // 我的客户
      path: "/my_client",
      component: () => import("../views/page/my/my_client.vue"),
    },
    {
      // 添加
      path: "/add",
      component: () => import("../views/page/my/add.vue"),
    },
    {
      // 添加我的客户
      path: "/add1",
      component: () => import("../views/page/my/add1.vue"),
    },
    // 团队路由
    {
      // 团队订单
      path: "/team_order",
      component: () => import("../views/page/team/team_order.vue"),
    },
    {
      // 团队客户
      path: "/team_client",
      component: () => import("../views/page/team/team_client.vue"),
    },
    // 审批路由
    {
      // 订单初审
      path: "/order_first",
      component: () => import("../views/page/check/order_first.vue"),
    },
    {
      // 订单复审
      path: "/order_recheck",
      component: () => import("../views/page/check/order_recheck.vue"),
    },
    {
      // 入职审批
      path: "/entry",
      component: () => import("../views/page/check/entry.vue"),
    },
    {
      // OA管理
      path: "/oa_set",
      component: () => import("../views/page/check/oa_set.vue"),
    },
    // 公司路由
    {
      // 员工
      path: "/employee",
      component: () => import("../views/page/company/employee.vue"),
    },
    {
      // 部门
      path: "/department",
      component: () => import("../views/page/company/department.vue"),
    },
    {
      // 饼图统计
      path: "/pie_img",
      component: () => import("../views/page/company/pie_img.vue"),
    },
    {
      // 折线统计
      path: "/line_img",
      component: () => import("../views/page/company/line_img.vue"),
    },
    {
      // 开票信息
      path: "/make_msg",
      component: () => import("../views/page/company/make_msg.vue"),
    },
  ],
});
export default router;
